<?php
session_start();

if ((!isset($_SESSION["user"]) || $_SESSION["user"] == "") &&
	strpos($_SERVER["PHP_SELF"], "index") === false &&
	strpos($_SERVER["PHP_SELF"], "notlogged") === false &&
	strpos($_SERVER["PHP_SELF"], "login") === false)
{
	echo "<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=notlogged.php\">\n";
	exit();
}

$GLOBALS["pagetitle"] = "Terapia del Dolor";
$GLOBALS["meses"] = array("", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
$GLOBALS["diassemana"] = array("domingo", "lunes", "martes", "mi".chr(233)."rcoles", "jueves", "viernes", "s".chr(225)."bado");

define("PAG_LIMIT", 200);
define("MAX_ATTEMPTS", 3);

/*
$db_host = "db316.1and1.es"; //"10.0.5.190";
$db_user = "dbo335899476"; //"i23461_1";
$db_pass = "u289t8u8"; //"0lo8wn1k";
$db_name = "db335899476"; //"i23461_1";
*/

/*
$db_host = "188.93.74.235";
$db_user = "dbusr_terdol";
$db_pass = "vikinga";
$db_name = "db_terdol";
*/

$db_host = "dbterdol.db.8521781.hostedresource.com";
$db_user = "dbterdol";
$db_pass = "T3rd0l7*";
$db_name = "dbterdol";

$sock = mysql_connect($db_host, $db_user, $db_pass);
if (strpos($_SERVER["PHP_SELF"], "index") === false) mysql_select_db($db_name, $sock);

$GLOBALS["arrlogerr"][0] = "Authentication OK";
$GLOBALS["arrlogerr"][1] = "Unregistered user";
$GLOBALS["arrlogerr"][2] = "Incorrect password";
$GLOBALS["arrlogerr"][3] = "Access blocked";
?>
